<template>
	<view class="index" :style="{paddingTop:marginTop+'px'}">
		<view class="mesBox" >
			<view class="msg-top">
				<view class="name">
					<view class="touxiang"></view>
					<text>{{messageDe.name}}</text>
				</view>
				<text class="date">{{messageDe.date}}</text>
			</view>
			<view class="msg-title">
				<view class="tag">#{{messageDe.titleTag}}#</view>
				<view class="title">{{messageDe.title}}</view>
			</view>
			<view class="msg-msg">{{messageDe.message}}</view>
			<view class="msg-img">
				<view class="box"></view>
				<view class="box"></view>
				<view class="box"></view>
			</view>
		</view>
		<view class="letterBox">
			<view class="let-title">
				<view class="icon"></view>
				<text>全部评论
					<text class="count">({{countL}})</text>
				</text>
			</view>
			<view
			 class="let-list" 
			 v-for="(item,index) in letterList" 
			 :key="index"
			 >
				<view class="let-top">
					<view class="name">
						<view class="touxiang"></view>
						<text>{{item.name}}</text>
					</view>
					<view class="date">{{item.date}}</view>
				</view>
				<view class="let-msg">
					<view class="msg">{{item.message}}</view>
					<view class="restoreBox">
						<view
							class="restore"
							v-for="(items,index) in item.restore"
							:key="index"
						>
							<text class="res-name">{{messageDe.name}}</text>
							<text>{{kongGe}}回复{{kongGe}}</text>
							<text class="res-name">{{item.name}}</text>
							<text>：{{kongGe}}{{items.message}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- <view class="tabbar-bottom">
			<input type="text" :adjust-position='true' />
		</view> -->
		<view class="zhanWei"></view>
		<view class="footer">
			<input class="footer_left" type="text" placeholder="发布评论..">
			<view class="footer_right">
				发布
			</view>
		</view>		
	</view>
</template>

<script>
import store from '../../store'
	export default {
		data() {
			return {
				messageDe:{},
				letterList:[],
				countL : 3,
				kongGe:' ' ,
			}
		},
		methods: {
			
		},
		onLoad(index) {
			// uni.showLoading({
			// 	title:"数据加载中..."
			// })
			// 	uni.hideLoading()
			this.messageDe =store.state.messageList[index.index]
			this.letterList = this.messageDe.letter
			console.log(this.letterList)
		}
	}
</script>

<style lang="less" scoped>
	page {
		background-color: #F2F2F2;
		height: 100%;
		font-weight: 500;
	}
	.index{
		border-top: 2rpx solid #FCFCFD;
		height: 1182rpx;
		padding-left: 37rpx;
		padding-right: 30rpx;
		background-color: #FFFFFF;
		//详情
		.mesBox{
			border-bottom: #F9F9F9 solid 3rpx;
			.msg-top{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 23rpx;
				.name{
					display: flex;
					justify-content: space-between;
					align-items: center;
					.touxiang{
						width: 56rpx;
						height: 56rpx;
						background-color: #FF7D12;
						border-radius: 180rpx;
					}
					text{
						padding: 15rpx;
					}
					font-size: 30rpx;
				}
				.date{
					font-size: 26rpx;
					line-height: 36rpx;
					font-weight: 500;
					color: #949492;
				}
			}
			.msg-title{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 25rpx;
				margin-bottom: 28rpx;
				font-size: 32rpx;
				.tag{
					color:#FF7D12 ;
					font-size: 32rpx;
					background-color: #FFE5D4;
					padding: 17rpx 17rpx 20rpx 21rpx;
					border-radius: 10rpx;
				}
				.title{
					font-size: 32rpx;
					line-height: 45rpx;
				}
			}
			.msg-msg{
				font-size: 30rpx;
				line-height: 45rpx;
			}
			.msg-img{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 25rpx;
				margin-bottom: 55rpx;
				.box{
					width: 220rpx;
					height: 220rpx;
					background-color: blue;
					border-radius: 15rpx;
				}
			}
			
		}
	
		//评论区
		.letterBox{
			.let-title{
				margin-top: 38rpx;
				margin-bottom: 14rpx;
				display: flex;
				align-items: center;
				.icon{
					width: 8rpx;
					height: 28rpx;
					background-color: #FE712A;
					border-radius: 4rpx;
					margin-right: 10rpx;
				}
				text{
					font-size: 30rpx;
					.count{
						font-size: 24rpx;
					}
				}
			}
			.let-list{
				padding-top: 24rpx;
				padding-bottom: 28rpx;
				border-bottom: #FBFBFB solid 3rpx ;
				.let-top{
					display: flex;
					align-items: center;
					justify-content: space-between;
					.name{
						display: flex;
						align-items: center;
						.touxiang{
							width: 56rpx;
							height: 56rpx;
							background-color: #FF7D12;
							border-radius: 180rpx;
						}
						text{
							margin-left: 13rpx;
							font-size: 30rpx;
						}
					}
					.date{
						font-size: 26rpx;
						line-height: 36rpx;
						font-weight: 500;
						color: #949492;
					}
				}
				.let-msg{
					margin-left: 65rpx;
					.msg{
						margin-top: 9rpx;
						margin-bottom: 21rpx;
						font-size: 28rpx;
						line-height: 36rpx;
					}
					.restoreBox{
						background-color: #F5F5F5;
						padding: 32rpx 29rpx 34rpx 22rpx;
						border-radius: 7rpx;
						font-size: 28rpx;
						.restore{
							line-height: 36rpx;
							.res-name{
								color: #444CEF;
							}
						}
					}
				}
			}	
		}
		.zhanWei{
			height: 140rpx;
		}
		//底部
		.footer {
			width: 750rpx;
			height: 140rpx;
			font-size: 28rpx;
			line-height: 45rpx;
			background: #FFFFFF;
			position: fixed;
			bottom: 0;
			left: 0;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.footer_left {
				display: flex;
				flex-direction: column;
				background-color: #F9F9F9;
				color: #949492;
				height: 63rpx;
				width: 563rpx;
				padding-left: 43rpx;
				margin-left: 28rpx;
				border-radius: 35rpx;
			}
			.footer_right {
				color: #fff;
				width: 110rpx;
				height: 63rpx;
				text-align: center;
				display: flex;
				justify-content: center;
				align-items: center;
				background-color: #F6570A;
				border-radius: 32rpx;
				margin-right: 30rpx;
				margin-left: 19rpx;
				line-height: 45rpx;
			}
		}
	}
</style>
